package com.xxl.job.executor.controller;

import com.xxl.job.executor.model.vo.ExecutorStatus;
import com.xxl.job.executor.service.ExecutorStatusService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MainController {


    private final ExecutorStatusService executorStatusService;

    public MainController(ExecutorStatusService executorStatusService) {
        this.executorStatusService = executorStatusService;
    }

    @GetMapping("/")
    public ExecutorStatus getStatus() {
        return executorStatusService.getExecutorStatus();
    }

}